package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.User;
import com.fz.us.admin.dict.entity.DictItem;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by dzw on 2017/12/11.
 * 请假申请
 */
@Entity
@Table(name="ec_leave")
public class Leave extends BaseFlowEntity {
    private static final long serialVersionUID = -4778972691244999620L;

    /**
     * 请假人员
     */
    private User leaveUser;
    /**
     * 请假类别
     */
    private DictItem leaveType;
    /**
     * 请假天数
     */
    private double leaveDayNum;
    /**
     * 请假开始日期
     */
    private Date leaveStartDate;
    /**
     * 请假结束日期
     */
    private Date leaveEndDate;
    /**
     * 请假事由
     */
    private String leaveReason;
    /**
     * 是否结束 0未结束 1已结束
     */
    private int isFinished;
    /**
     * 是否完成休假 是 否
     */
    private String isComplete;

    @ManyToOne(fetch = FetchType.LAZY)
    public User getLeaveUser() {
        return leaveUser;
    }

    public void setLeaveUser(User leaveUser) {
        this.leaveUser = leaveUser;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public DictItem getLeaveType() {
        return leaveType;
    }

    public void setLeaveType(DictItem leaveType) {
        this.leaveType = leaveType;
    }

    public double getLeaveDayNum() {
        return leaveDayNum;
    }

    public void setLeaveDayNum(double leaveDayNum) {
        this.leaveDayNum = leaveDayNum;
    }

    public Date getLeaveStartDate() {
        return leaveStartDate;
    }

    public void setLeaveStartDate(Date leaveStartDate) {
        this.leaveStartDate = leaveStartDate;
    }

    public Date getLeaveEndDate() {
        return leaveEndDate;
    }

    public void setLeaveEndDate(Date leaveEndDate) {
        this.leaveEndDate = leaveEndDate;
    }

    public String getLeaveReason() {
        return leaveReason;
    }

    public void setLeaveReason(String leaveReason) {
        this.leaveReason = leaveReason;
    }

    public int getIsFinished() {
        return isFinished;
    }

    public void setIsFinished(int isFinished) {
        this.isFinished = isFinished;
    }

    public String getIsComplete() {
        return isComplete;
    }

    public void setIsComplete(String isComplete) {
        this.isComplete = isComplete;
    }
}
